home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
pascal
/
tvmouse.exe
/
README
< prev
next >
Wrap
Text File
|
1993-01-04
|
4KB
|
83 lines
These routines were sent to John Friel, author of QModem. I included
this letter to him because it explains the routines.
-----------------------------------------------------------------------
Hi John,
Here are some mouse routines that run under Turbo Vision. They provide
the following enhancements.
1) They are fast for hiding and unhideing the mouse. Calling INT 33 func
0x01 and 0x02 is really slow. When using these routines, hiding
and unhiding the mouse is almost instant. If they were re-written
in assembly they'd be even faster.
2) They don't take alot of overhead.
3) They allow support for other text modes. (like 100x60 or 132x50).
Turbo Vision already supports odd text modes. Just run whatever
text mode setting program that came with your SVGA card and set
the text mode to something non-standard. Now run QModemPro and notice
that Turbo Vision is using the entire display. Also notice that the
mouse is not 'synced' to the display. If you use these routines
then the mouse will work even in these modes.
4) They can return any range of values for any display resolution.
5) They work in all modes on all mouse drivers because they compute
there own position. This is the original reason I wrote these
routines because on mode 0x13 (320x200x256) the Microsoft and
Logitech drivers return a different range of values from INT 33
func 0x03 and there is no solution except to do something like
this.
The files here are the sample program TVEDIT from the
C:\BORLANDC\TVISION\DEMOS diretory. I didn't change any of those files.
The only files I changed are TEVENT.CPP and TMOUSE.CPP from the
C:\BORLANDC\TVISION\SOURCE directory and I added IBMMOUSE.cpp.
Go into the IDE and load 'TVEDIT.PRJ' and check the directories so they
point to the correct libs and includes and then compile. Now exit the
IDE and switch to any text mode like 132x25 or 132x44 or 132x50 or 100x60.
(My Video7 VRAM supports these modes as does my STB Powergraph/VGA). Now
run TVEDIT and notice it is fully functional.
This file was original used for some graphic tools and not text mode.
SetMouseRange() sets the min and max values that the mouse routines will
return when calling ReadMouse (). This routine does not
'bound' the mouse to a certain area of the screen.
SetMousePosition() sets the mouse to a certain position. That position
is relative to the values used in SetMouseRange().
SetMouseResolution() sets the number of virtual pixels across the display.
In otherwords if you set it to 1000 by 1000 then there
are 1000 internal positions from the left side of the
screen to the right (and up and down) even though ReadMouse()
will still only return values inside the range set by
SetMouseRange (). This has the effect of making the mouse
more or less sensitive.
SetMouseScreenDimensions () sets the width and height of the screen the
mouse is being used on. In otherwords if you are in
80x25 text mode then you would call this routine with
80, 25. Turbo Vision already calls this routine.
I hacked this together real quick and as such there is room for many
improvements.
1) Make it assembly lang for speed and size.
2) Fix the support for mouseInt() in TEVENT.cpp so that ReadMouse() returns
information more similar to what used to be passed in by the real
interrupt.
3) Speed up the hardware timer interrupt to 60hertz for 'smoother' pointer
responce.
4) Fix OpenMouse() and CloseMouse() so they aren't such a mess.
5) Fix it so it gets it's screen mem pointer from Turbo Vision. Currently
the routines are hardcoded for a Color display at 0xB8000
GreggT.